// targetServer.js(http://localhost:3001)
const http = require('http')
const data1 = { title: 'get...', password: '123' }
const data2 = { title: 'post...', password: '456' }
const server = http.createServer((request, response) => {
    if (request.url === '/get') {
        response.end(JSON.stringify(data1))
    }
    if (request.url === '/post') {
        response.end(JSON.stringify(data2))
    }
    console.log(request.url)
})
server.listen(3001, () => {
    console.log('The targetServer is running at http://localhost:3001')
})

